<?php
/**
 * groupprogram路由
 */

use think\Route;

$afterBehavior = [
    '\app\groupprogram\behavior\ApiAuth',
];

Route::group('groupprogram', function () use ($afterBehavior) {
    Route::rule([
        ':ver/Time/getTime' => [
            'groupprogram/Time/getTime',
            ['method' => 'post']
        ]
    ]);

    Route::group(':ver/Notify',[
        'wxProgramNotify' => [
            'groupprogram/:ver.Notify/wxProgramNotify',
            ['method' => 'post']
        ],
        'wxrefundProgramNotify' => [
            'groupprogram/:ver.Notify/wxrefundProgramNotify',
            ['method' => 'post']
        ],
        'AftersalesNotify' => [
            'groupprogram/:ver.Notify/AftersalesNotify',
            ['method' => 'post']
        ],
        'wxProgramNotifyMerge' => [
            'groupprogram/:ver.Notify/wxProgramNotifyMerge',
            ['method' => 'post']
        ],
        'wxRechargeNotify' => [
            'groupprogram/:ver.Notify/wxRechargeNotify',
            ['method' => 'post']
        ],
        'wxProgramNotifyOffline' => [
            'groupprogram/:ver.Notify/wxProgramNotifyOffline',
            ['method' => 'post']
        ],
        'wxVipNotify' => [
            'groupprogram/:ver.Notify/wxVipNotify',
            ['method' => 'post']
        ],
        'wxGrambleNotify' => [
            'groupprogram/:ver.Notify/wxGrambleNotify',
            ['method' => 'post']
        ],
        'wxGroupRechargeNotify' => [
            'groupprogram/:ver.Notify/wxGroupRechargeNotify',
            ['method' => 'post']
        ],
    ]);

    Route::rule([
        ':ver/Upload/upload' => [
            'groupprogram/:ver.Upload/upload',
            [
                'method' => 'post',
                'after_behavior' => [
                    '\app\groupprogram\behavior\UploadApiAuth',
                ]
            ]
        ]
    ]);


    //登陆/注册
    Route::group(':ver/ProgramLogin',[
        'login' => [
            'groupprogram/:ver.ProgramLogin/login',
            ['method' => 'post']
        ],
        'loginByCode' => [
            'groupprogram/:ver.ProgramLogin/loginByCode',
            ['method' => 'post']
        ],
        'getToken' => [
            'groupprogram/:ver.ProgramLogin/getToken',
            ['method' => 'post']
        ],
        'SendMobileCode' => [
            'groupprogram/:ver.ProgramLogin/SendMobileCode',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);


    //首页
    Route::group(':ver/index',[
        'getReachHomeList' => [
            'groupprogram/:ver.index/getReachHomeList',
            ['method' => 'post']
        ],
        'getReachClassList' => [
            'groupprogram/:ver.index/getReachClassList',
            ['method' => 'post']
        ],
        'getHotActiveList' => [
            'groupprogram/:ver.index/getHotActiveList',
            ['method' => 'post']
        ],
        'policy' => [
            'groupprogram/:ver.index/policy',
            ['method' => 'post']
        ],
        'addComplain' => [
            'groupprogram/:ver.index/addComplain',
            ['method' => 'post']
        ],
        'getMoneyOff' => [
            'groupprogram/:ver.index/getMoneyOff',
            ['method' => 'post']
        ],
        'banner' => [
            'groupprogram/:ver.index/banner',
            ['method' => 'post']
        ],
        'banner1' => [
            'groupprogram/:ver.index/banner1',
            ['method' => 'post']
        ],
        'getOrderfind' => [
            'groupprogram/:ver.index/getOrderfind',
            ['method' => 'post']
        ],
        'pop' => [
            'groupprogram/:ver.index/pop',
            ['method' => 'post']
        ],
        'auctionInit' => [
            'groupprogram/:ver.index/auctionInit',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);




    //用户
    Route::group(':ver/user',[
        'getUserInfo' => [
            'groupprogram/:ver.user/getUserInfo',
            ['method' => 'post']
        ],
        'getUserInfos' => [
            'groupprogram/:ver.user/getUserInfos',
            ['method' => 'post']
        ],
        'getUserMoney' => [
            'groupprogram/:ver.user/getUserMoney',
            ['method' => 'post']
        ],
        'setPhoto' => [
            'groupprogram/:ver.user/setPhoto',
            ['method' => 'post']
        ],
        'setNickname' => [
            'groupprogram/:ver.user/setNickname',
            ['method' => 'post']
        ],
        'logout' => [
            'groupprogram/:ver.user/logout',
            ['method' => 'post']
        ],
        'unbind' => [
            'groupprogram/:ver.user/unbind',
            ['method' => 'post']
        ],
        'bindingParent' => [
            'groupprogram/:ver.user/bindingParent',
            ['method' => 'post']
        ],
        'getMyTeam' => [
            'groupprogram/:ver.user/getMyTeam',
            ['method' => 'post']
        ],
        'isPassword' => [
            'groupprogram/:ver.user/isPassword',
            ['method' => 'post']
        ],
        'setPayPassword' => [
            'groupprogram/:ver.user/setPayPassword',
            ['method' => 'post']
        ],
        'PayPassword' => [
            'groupprogram/:ver.user/PayPassword',
            ['method' => 'post']
        ],
        'payPasswordSendMobileCode' => [
            'groupprogram/:ver.user/payPasswordSendMobileCode',
            ['method' => 'post']
        ],
        'getPaymentLogDetail' => [
            'groupprogram/:ver.user/getPaymentLogDetail',
            ['method' => 'post']
        ],
        'getPaymentLog' => [
            'groupprogram/:ver.user/getPaymentLog',
            ['method' => 'post']
        ],
        'placeRechargeOrder' => [
            'groupprogram/:ver.user/placeRechargeOrder',
            ['method' => 'post']
        ],
        'userCouponList' => [
            'groupprogram/:ver.user/userCouponList',
            ['method' => 'post']
        ],
        'updateWxUser' => [
            'groupprogram/:ver.user/updateWxUser',
            ['method' => 'post']
        ],
        'myTeamList' => [
            'groupprogram/:ver.user/myTeamList',
            ['method' => 'post']
        ],
        'getPaymentlist' => [
            'groupprogram/:ver.user/getPaymentlist',
            ['method' => 'post']
        ],
        'getUserMoneylist' => [
            'groupprogram/:ver.user/getUserMoneylist',
            ['method' => 'post']
        ],
        'tixian' => [
            'groupprogram/:ver.user/tixian',
            ['method' => 'post']
        ],
        'getAwardInit' => [
            'groupprogram/:ver.user/getAwardInit',
            ['method' => 'post']
        ],
        'getMoneyOff' => [
            'groupprogram/:ver.user/getMoneyOff',
            ['method' => 'post']
        ],
        'getTeamRechargeList' => [
            'groupprogram/:ver.user/getTeamRechargeList',
            ['method' => 'post']
        ],
        'awardTotal' => [
            'groupprogram/:ver.user/awardTotal',
            ['method' => 'post']
        ],
        'getGroupMoneylist' => [
            'groupprogram/:ver.user/getGroupMoneylist',
            ['method' => 'post']
        ],
        'getGambleMoneylist' => [
            'groupprogram/:ver.user/getGambleMoneylist',
            ['method' => 'post']
        ],
        'tixianGroupMoney' => [
            'groupprogram/:ver.user/tixianGroupMoney',
            ['method' => 'post']
        ],
        'tixianGambleMoney' => [
            'groupprogram/:ver.user/tixianGambleMoney',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);





    Route::group(':ver/Cart',[
        'add' => [
            'groupprogram/:ver.Cart/add',
            ['method' => 'post']
        ],
        'getCartListByUserId' => [
            'groupprogram/:ver.Cart/getCartListByUserId',
            ['method' => 'post']
        ],
        'delete' => [
            'groupprogram/:ver.Cart/delete',
            ['method' => 'post']
        ],
        'update' => [
            'groupprogram/:ver.Cart/update',
            ['method' => 'post']
        ],
        'getCount' => [
            'groupprogram/:ver.Cart/getCount',
            ['method' => 'post']
        ],

    ],['after_behavior' => $afterBehavior]);


    //商家模块
    Route::group(':ver/Test',[
        'prizeInit' => [
            'groupprogram/:ver.test/prizeInit',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);


    //商品模块
    Route::group(':ver/FreshProduct',[
        'getProductList' => [
            'groupprogram/:ver.FreshProduct/getProductList',
            ['method' => 'post']
        ],
        'getProductDetail' => [
            'groupprogram/:ver.FreshProduct/getProductDetail',
            ['method' => 'post']
        ],
        'getproductQrcode' => [
            'groupprogram/:ver.FreshProduct/getproductQrcode',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);


    Route::group(':ver/FreshClass',[
        'getFreshClassList' => [
            'groupprogram/:ver.FreshClass/getFreshClassList',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/FreshOrder',[
        'produceOrder' => [
            'groupprogram/:ver.FreshOrder/produceOrder',
            ['method' => 'post']
        ],
        'payment' => [
            'groupprogram/:ver.FreshOrder/payment',
            ['method' => 'post']
        ],
        'paymentMerge' => [
            'groupprogram/:ver.FreshOrder/paymentMerge',
            ['method' => 'post']
        ],
        'getOrderList' => [
            'groupprogram/:ver.FreshOrder/getOrderList',
            ['method' => 'post']
        ],
        'getOrderDetail' => [
            'groupprogram/:ver.FreshOrder/getOrderDetail',
            ['method' => 'post']
        ],
        'cancelOrder' => [
            'groupprogram/:ver.FreshOrder/cancelOrder',
            ['method' => 'post']
        ],
        'getLogistics' => [
            'groupprogram/:ver.FreshOrder/getLogistics',
            ['method' => 'post']
        ],
        'fulfill' => [
            'groupprogram/:ver.FreshOrder/fulfill',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/Area',[
        'getList' => [
            'groupprogram/:ver.Area/getList',
            ['method' => 'post']
        ],
        'getListSsq' => [
            'groupprogram/:ver.Area/getListSsq',
            ['method' => 'post']
        ],
        'detail' => [
            'groupprogram/:ver.Area/detail',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/UserAddress',[
        'getUserAddressList' => [
            'groupprogram/:ver.UserAddress/getUserAddressList',
            ['method' => 'post']
        ],
        'updateUserAddress' => [
            'groupprogram/:ver.UserAddress/updateUserAddress',
            ['method' => 'post']
        ],
        'deleteAddress' => [
            'groupprogram/:ver.UserAddress/deleteAddress',
            ['method' => 'post']
        ],
        'getDefault' => [
            'groupprogram/:ver.UserAddress/getDefault',
            ['method' => 'post']
        ],
        'setDefault' => [
            'groupprogram/:ver.UserAddress/setDefault',
            ['method' => 'post']
        ],

    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/FreshRechargeOrder',[
        'placeRechargeOrder' => [
            'groupprogram/:ver.FreshRechargeOrder/placeRechargeOrder',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    //商家模块
    Route::group(':ver/master',[
        'getMasterList' => [
            'groupprogram/:ver.master/getMasterList',
            ['method' => 'post']
        ],
        'getMasterListSearch' => [
            'groupprogram/:ver.master/getMasterListSearch',
            ['method' => 'post']
        ],
        'getClassList' => [
            'groupprogram/:ver.master/getClassList',
            ['method' => 'post']
        ],
        'getMasterInfo' => [
            'groupprogram/:ver.master/getMasterInfo',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/FreshOfflineOrder',[
        'addoffline' => [
            'groupprogram/:ver.FreshOfflineOrder/addoffline',
            ['method' => 'post']
        ],
        'offlinepayment' => [
            'groupprogram/:ver.FreshOfflineOrder/offlinepayment',
            ['method' => 'post']
        ],
        'getIntegral' => [
            'groupprogram/:ver.FreshOfflineOrder/getIntegral',
            ['method' => 'post']
        ],
        'orderDetail' => [
            'groupprogram/:ver.FreshOfflineOrder/orderDetail',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/FreshVipOrder',[
        'vipInit' => [
            'groupprogram/:ver.FreshVipOrder/vipInit',
            ['method' => 'post']
        ],
        'submit' => [
            'groupprogram/:ver.FreshVipOrder/submit',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/GambleProduct',[
        'getProductList' => [
            'groupprogram/:ver.GambleProduct/getProductList',
            ['method' => 'post']
        ],
        'getProductDetail' => [
            'groupprogram/:ver.GambleProduct/getProductDetail',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/GambleOrder',[
        'submitOrder' => [
            'groupprogram/:ver.GambleOrder/submitOrder',
            ['method' => 'post']
        ],
        'payment' => [
            'groupprogram/:ver.GambleOrder/payment',
            ['method' => 'post']
        ],
        'setIsReplen' => [
            'groupprogram/:ver.GambleOrder/setIsReplen',
            ['method' => 'post']
        ],
        'getOrderDetail' => [
            'groupprogram/:ver.GambleOrder/getOrderDetail',
            ['method' => 'post']
        ],
        'getOrderList' => [
            'groupprogram/:ver.GambleOrder/getOrderList',
            ['method' => 'post']
        ],
        'deliveryOrder' => [
            'groupprogram/:ver.GambleOrder/deliveryOrder',
            ['method' => 'post']
        ],
        'refundApply' => [
            'groupprogram/:ver.GambleOrder/refundApply',
            ['method' => 'post']
        ],
        'recyclingApply' => [
            'groupprogram/:ver.GambleOrder/recyclingApply',
            ['method' => 'post']
        ],
        'auctionApply' => [
            'groupprogram/:ver.GambleOrder/auctionApply',
            ['method' => 'post']
        ],
        'platformRecycling' => [
            'groupprogram/:ver.GambleOrder/platformRecycling',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/AuctionRecord',[
        'getOrderList' => [
            'groupprogram/:ver.AuctionRecord/getOrderList',
            ['method' => 'post']
        ],
        'getOrderDetail' => [
            'groupprogram/:ver.AuctionRecord/getOrderDetail',
            ['method' => 'post']
        ],
        'auctionSubmit' => [
            'groupprogram/:ver.AuctionRecord/auctionSubmit',
            ['method' => 'post']
        ],
        'platformSubmit' => [
            'groupprogram/:ver.AuctionRecord/platformSubmit',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    Route::group(':ver/AuctionOrder',[
        'getOrderList' => [
            'groupprogram/:ver.AuctionOrder/getOrderList',
            ['method' => 'post']
        ],
        'getOrderDetail' => [
            'groupprogram/:ver.AuctionOrder/getOrderDetail',
            ['method' => 'post']
        ],
        'auctionGoodsList' => [
            'groupprogram/:ver.AuctionOrder/auctionGoodsList',
            ['method' => 'post']
        ],
        //deliveryOrder
        'deliveryOrder' => [
            'groupprogram/:ver.AuctionOrder/deliveryOrder',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

    //placeRechargeOrder
    Route::group(':ver/GroupRechargeOrder',[
        'placeRechargeOrder' => [
            'groupprogram/:ver.GroupRechargeOrder/placeRechargeOrder',
            ['method' => 'post']
        ],
    ],['after_behavior' => $afterBehavior]);

});
